package com.xmall.controller.wx;

import com.xmall.bean.table.Brand;
import com.xmall.bean.vo.BaseRespVo;
import com.xmall.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("wx/brand")
public class BrandWeChatController {
    @Autowired
    BrandService brandService;

    @RequestMapping("list")
    public BaseRespVo showBrandList(Integer page,Integer size){
        Map<String,Object> listDataVo = brandService.showBrandList(page,size);
        return BaseRespVo.ok(listDataVo);
    }

    @RequestMapping("detail")
    public BaseRespVo showBrandDetailById(Integer id){
        Brand brand = brandService.showBrandDetailById(id);
        return BaseRespVo.ok(brand);
    }
}
